package com.dropdb.demo.service;

import com.dropdb.demo.bean.*;
import com.dropdb.demo.bean.bo.GrouponRuleCreateBO;
import com.dropdb.demo.bean.vo.BaseData;
import com.dropdb.demo.bean.vo.CouponListData;
import com.dropdb.demo.bean.vo.CouponListElementtData;

import java.util.List;

/**
 * @author qugr
 * @create 2020-06-26 16:57
 */
public interface PromotionService {

    BaseData queryAds(Integer page, Integer limit, String name, String content, String sort, String order);

    int insertAd(Ad ad);

    Ad queryAd(Integer id);

    int deleteAd(Integer id);

    int updateAd(Ad ad);

    BaseData queryCoupons(Integer page, Integer limit, String name, Short type, Short status, String sort, String order);

    int insertCoupon(Coupon coupon);

    Coupon queryCoupon(Integer id);

    int deleteCoupon(Integer id);

    BaseData queryCouponUsers(Integer page, Integer limit, Integer couponId, Integer userId, Short status, String sort, String order);

    int updateCoupon(Coupon coupon);

    BaseData queryTopics(Integer page, Integer limit, String title, String subtitle, String sort, String order);

    int insertTopic(Topic topic);

    Topic queryTopic(Integer id);

    int deleteTopic(Integer id);

    int updateTopic(Topic topic);

    BaseData queryGrouponRules(Integer page, Integer limit, Integer goodsId, String sort, String order);

    int deleteGrouponRule(Integer id);

    int insertGrouponRule(Goods goods, GrouponRuleCreateBO grouponRuleBO);

    GrouponRules queryGrouponRule(Integer id);

    int updateGrouponRule(Goods goods, GrouponRules grouponRule);

    BaseData queryGroupon(Integer page, Integer limit, Integer goodsId, String sort, String order);


    //前台优惠券
    List<CouponListElementtData> selectCouponList(Integer userId, Integer cartId);

    int receiveCoupon(Integer userId, Integer couponId);

    int exchangeCoupon(Integer userId, String code);

    CouponListData myCouponList(Integer userId, Integer status, Integer page, Integer size);

    CouponListData couponList(Integer userId, Integer page, Integer size);
}
